<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/templates/_template.xhtml">

        <ui:define name="titulo">

            <h3>Fechamento Diário</h3>

        </ui:define>

        <ui:define name="conteudo">
            <p:dialog modal="true" widgetVar="statusDialog" header="Gerando Relatório, Aguarde!!!" draggable="false" closable="false" resizable="false">  
                <p:graphicImage  library="img" name="ajax-loader.gif" />  
            </p:dialog>  

            <script type="text/javascript">
                function start() {
                    PF('statusDialog').show();
                }

                function stop() {
                    PF('statusDialog').hide();
                }
            </script>  
            
            <p:growl autoUpdate="true" />

            <h:form>
                <p:messages id="messages" autoUpdate="true" />

                <p:fieldset legend="Fechamento Diário" styleClass="fieldsetSms">

                    <br />
                    <h:outputLabel/>
                    <h:panelGrid columns="2">
                        <h:outputLabel value="Data Fechamento: "  for="dtini" styleClass="rotulos"/>    
                        <p:calendar id="dtini"
                                    value="#{smsBean.dataini}"
                                    pattern="dd/MM/yyyy" timeZone="America/Sao_Paulo" required="true" requiredMessage="Data obrigatória"  />

                     
                    </h:panelGrid>

                   <p:commandButton value="Processar" action="#{clienteBean.salvar}" />
                   <!--  <p:commandLink  ajax="false" id="html" onclick="PrimeFaces.monitorDownload(start, stop);" >
                      <f:setPropertyActionListener target="#{smsBean.tipoRelatorio}"
                                                     value="3" />
                        <p:fileDownload value="#{smsBean.arquivoRetorno}" />
                        <h:graphicImage library="img" name="html.png"
                                        title="Imprimir HTML" />
                    </p:commandLink>-->
                  
                    <br />

                </p:fieldset>
            </h:form>

        </ui:define>
    </ui:composition>

</html>